Skip to content

Add metadata discovery endpoints for curves and exports#1774

Open
louispt1 wants to merge 4 commits into
masterfrom
output-meta-endpoint
Open

Add metadata discovery endpoints for curves and exports#1774
louispt1 wants to merge 4 commits into
masterfrom
output-meta-endpoint

Conversation

@louispt1

@louispt1 louispt1 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Context

PyETM previously hard-coded the list of available curves and exports. Any new output required changes in pyetm too. These endpoints let pyetm discover available outputs at runtime so a new curve or export can be added to ETEngine without cascading changes.

Implemented changes

  • Adds GET /api/v3/curves/metadata returning all registered hourly output curves with their name, type, and description
  • Adds GET /api/v3/exports/metadata returning all registered annual exports with their name and description
  • Introduces CurveMetadataRegistry, a registry populated at startup via an initialiser; curves and exports register themselves in their respective controllers

Related

Goes with this pyetm PR and this documentation PR

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

@noracato

noracato commented Jul 9, 2026

Copy link
Copy Markdown
Member

Smart thinking with the registry, as the exports are not available as models.

A few questions:

  1. Why did you choose a new controller, and not implemented an index on both curves and exports?
  2. I understand the want to register curves in the controller, as all info will be in one spot. But is that the correct spot for it? I would expect this more in some form of config.
  3. We should come up with a common name for exports and curves: results? scenarioData? Like this the registry can carry the common name

Although I like the direction you are taking, this might need some more thought and design? A first step could be a hardcoded index endpoint, if you want this change to be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants